package com.finfosoft.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.CrossOrigin;

import com.finfosoft.bean.User;
//@RepositoryRestResource(path="")  修改访问的路径
@CrossOrigin
public interface UserJpaRepsitory extends JpaRepository<User, Integer>{

	
	List<User> findByName (String name);
	
	@Transactional(readOnly = true)
	List<User> findByNameLike (String name);
	
	User findByNameAndAge(String name,int age);
	
}
